#-*-encoding=utf-8-*-
@script_attr(permission='zope.View', use_template=True)
def setup():
    """安装程序

    这是应用的安装程序"""

    # 创建一个flowcenter
    flowcenter = deployApplet('default.flowcenter', context)
    IFlowCenter(flowcenter).categories1 = (u'办公流程',)
    IFlowCenter(flowcenter).categories2 = (u'其他流程',)


    flow = deploySpreadSheet(flowcenter, name='review', title='审核流程', 
                      edoclass='oa.leave_record', workflow='oa.leave')

    IDublinCore(flow).subjects = (u'办公流程', )

    request.response.redirect(absoluteURL(flowcenter, request))

